package com.kensure.shike.zhang.model;

import co.kensure.frame.BaseInfo;

import com.kensure.shike.sys.model.SKDict;
import com.kensure.shike.sys.service.SKDictService;
import com.kensure.shike.user.model.SKUser;
import com.kensure.shike.user.model.SKUserFR;

/**
 * 用户余额流水对象类
 * 
 * @author fankd created on 2018-9-9
 * @since
 */
public class SKUserZhang extends BaseInfo {

	private static final long serialVersionUID = 3545276994084105527L;

	/***/
	private Long id;

	/** 用户id */
	private Long userid;

	/** 业务id */
	private Long busiid;

	/**
	 * 业务类型id 100以内是支出，100-200是收入, <br>
	 * 支出： 1是销售消费 ,2是提现 ,3是会员费 <br>
	 * 收入： 101是充值  102是换货收入  103是退货收入 109是会员一级分润，110会员是2级分润，119是订单一级分润，120是订单二级分润，199销售收入
	 */
	private Integer busitypeid;

	/** 余额 */
	private Double yue;

	/** 抵用金 */
	private Double dbyue;

	/** 微信支付金额 */
	private Double wxyue;

	/** 金币 */
	private Double jinbi;

	/** 对这个用户流进还是流出,1是进，-1是出 */
	private Integer inorout;

	/** 状态，1是正常，0是未生效，-1是失效 */
	private Integer status;

	/** 描述 */
	private String remark;
	/** 分润 */
	private SKUserFR fr;

	private SKUser user;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUserid() {
		return userid;
	}

	public void setUserid(Long userid) {
		this.userid = userid;
	}

	public Long getBusiid() {
		return busiid;
	}

	public void setBusiid(Long busiid) {
		this.busiid = busiid;
	}

	public Integer getBusitypeid() {
		return busitypeid;
	}

	public String getBusitypeidStr() {
		SKDict dict = SKDictService.getDictCache(5, this.busitypeid + "");
		String temp = "";
		if (dict != null) {
			temp = dict.getName();
		}
		return temp;
	}

	public void setBusitypeid(Integer busitypeid) {
		this.busitypeid = busitypeid;
	}

	public Double getYue() {
		return yue;
	}

	public void setYue(Double yue) {
		this.yue = yue;
	}

	public Double getJinbi() {
		return jinbi;
	}

	public void setJinbi(Double jinbi) {
		this.jinbi = jinbi;
	}

	public Integer getInorout() {
		return inorout;
	}

	public void setInorout(Integer inorout) {
		this.inorout = inorout;
	}

	public String getInoroutStr() {
		String temp = "";
		if(inorout == null){
			
		}else if (inorout == 1) {
			temp = "收入";
		} else if (inorout == -1) {
			temp = "支出";
		}
		return temp;
	}

	public Integer getStatus() {
		return status;
	}

	public String getStatusStr() {
		String temp = "";
		if(status == null){
			
		}else if (status == 0) {
			temp = "未生效";
		} else if (status == 1) {
			temp = "成功";
		} else if (status == -1) {
			temp = "退回";
		}
		return temp;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Double getDbyue() {
		return dbyue;
	}

	public void setDbyue(Double dbyue) {
		this.dbyue = dbyue;
	}

	public Double getWxyue() {
		return wxyue;
	}

	public void setWxyue(Double wxyue) {
		this.wxyue = wxyue;
	}

	public SKUserFR getFr() {
		return fr;
	}

	public void setFr(SKUserFR fr) {
		this.fr = fr;
	}

	public SKUser getUser() {
		return user;
	}

	public void setUser(SKUser user) {
		this.user = user;
	}

}
